//
//  NKSummaryWeeklyBarChartCollectionCell.swift
//  Nokia
//
//  Created by 易先生 on 2022/3/31.
//

import UIKit
import MYModule

class DataBarChartCollectionCell: CollectionViewCell {
    
    override func makeUI() {
        super.makeUI()
        contentView.addSubview(barView)
        barView.snp.makeConstraints { make in
            make.centerX.equalToSuperview()
            make.bottom.equalToSuperview()
            make.size.equalTo(CGSize(width: 8, height: 0))
        }
    }
    
    public func configHeight(barColor: UIColor, height: CGFloat,width: CGFloat) {
        barView.backgroundColor = barColor
        barView.snp.remakeConstraints { make in
            make.centerX.equalToSuperview()
            make.bottom.equalToSuperview()
            make.size.equalTo(CGSize(width: width, height: height))
        }
        barView.layoutIfNeeded()
        barView.setFastCorners(CGFloat(width/2))
    }
    
    public lazy var barView: UIView = {
        let barView = UIView()
        return barView
    }()
}
